home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / Gui4Cli / Docs / Tutorials / Radio.gc < prev    next >
Encoding:
Gui4CLI script  |  1980-01-03  |  1.3 KB  |  57 lines

  1. G4C
  2.  
  3. WinBig -1 -1 350 100 "Radio.gc"
  4. WinType 11110001
  5. usetopaz
  6.  
  7. BOX 0 0 0 0 OUT RIDGE
  8.  
  9. xonLoad 
  10. ;  Confirm the initial setting in the text gadget
  11. update Radio.gc 1 London
  12. GuiOpen Radio.gc
  13.  
  14. xonClose
  15. GuiQuit Radio.gc
  16.  
  17. Text 140 2 100 12 'Radio' 6 NOBOX               ;  Headings
  18.  
  19. ; ---- Arguments required for a Radio command :
  20. ;       L   T  W  H Variable Spacing
  21. ;       |   |  |  |   |      |
  22. xRadio 100 20 20  9 radvar   6
  23. RSTR London 0          ; The fields to be displayed
  24. RSTR Athens 1          ; with the radio buttons,
  25. RSTR Paris 2           ; and their values starting
  26. RSTR Berlin 3          ; form zero.
  27. RSTR Rome 4
  28.  
  29. ;   'Spacing' is (approx.) the distance _between_ buttons.
  30.  
  31. ; ----- A text gadget is used here to display the choice,
  32. ;       just for visible confirmation.  The following
  33. ;       'docase' lines assign the name to fit the
  34. ;       current value of $radvar, and update the text
  35. ;       gadget accordingly.
  36. docase $radvar 
  37.    case = 0
  38.      update Radio.gc 1 London
  39.      break
  40.   case = 1
  41.      update Radio.gc 1 Athens
  42.      break
  43.   case = 2
  44.      update Radio.gc 1 Paris
  45.      break
  46.   case = 3
  47.      update Radio.gc 1 Berlin
  48.      break
  49.   case = 4
  50.      update Radio.gc 1 Rome
  51.   endcase
  52.  
  53. ; ---- A text gadget to confirm the selection.
  54. Text 170 30 100 12 'Current choice' 14 NOBOX
  55. Text 190 42 60 12 '' 14 BOX
  56. gadid 1
  57.